<template>
<iframe id="template-iframe" ref="iframe" :src="src"  frameborder="0" width="100%" height="1024px" scrolling="auto" ></iframe>
  <!-- <a-form style="padding:20px; background-color: #fff;" :form="form">
    <a-row>
      <h2>企业基本信息：</h2>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="企业名称">
          <a-input
            placeholder="请输入企业名称"
            v-decorator="['enterpriseName', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="网点名称">
          <a-input
            placeholder="请输入企业名称"
            v-decorator="['wangdianName', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="统一社会信用代码">
          <a-input
            placeholder="请输入统一社会信用代码"
            v-decorator="['shehui', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="经营时间">
          <a-input
            placeholder="请输入经营时间"
            v-decorator="['date', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="经营地址">
          <a-input
            placeholder="请输入经营地址"
            v-decorator="['addr', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="经营状态">
          <a-input
            placeholder="请输入经营状态"
            v-decorator="['status', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售模式">
          <a-input
            placeholder="请输入销售模式"
            v-decorator="['moshi', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="功能">
          <a-input
            placeholder="请输入功能"
            v-decorator="['gongneng', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="门店电话">
          <a-input
            placeholder="请输入门店电话"
            v-decorator="['phone', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="门店介绍">
          <a-input
            placeholder="请输入门店介绍"
            v-decorator="['gongneng', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
    </a-row>
    <a-row>
      <h2>代理品牌信息：</h2>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="车辆类型">
          <a-input
            placeholder="请输入车辆类型"
            v-decorator="['type', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="品牌个数">
          <a-input
            placeholder="请输入品牌个数"
            v-decorator="['count', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="预约试驾电话">
          <a-input
            placeholder="请输入预约试驾电话"
            v-decorator="['testtype', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="预约试驾Url">
          <a-input
            placeholder="请输入预约试驾Url"
            v-decorator="['url', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="代理品牌">
          <a-input
            placeholder="请输入代理品牌"
            v-decorator="['daili', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="热销车型">
          <a-input
            placeholder="请输入热销车型"
            v-decorator="['hottype', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
    </a-row>
    <a-row>
      <h2>联系方式：</h2>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="企业负责人姓名">
          <a-input
            placeholder="请输入企业负责人姓名"
            v-decorator="['name', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="企业联系人姓名">
          <a-input
            placeholder="请输入企业联系人姓名"
            v-decorator="['name2', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="企业联系人电话">
          <a-input
            placeholder="请输入企业联系人电话"
            v-decorator="['phone2', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
    </a-row>
    <a-row>
      <h2>照片上传：</h2>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="门店照片上传">
          <a-upload-dragger
            name="file"
            :multiple="true"
            action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
            @change="handleChange"
          >
            <p class="ant-upload-drag-icon">
              <a-icon type="inbox" />
            </p>
            <p class="ant-upload-text">点击或拖拽上传</p>
            <p class="ant-upload-hint">
              支持单个或批量上传。严禁上传公司数据或其他信息波段文件
            </p>
          </a-upload-dragger>
        </a-form-item>
      </a-col>
    </a-row>
    <a-row>
      <a-col :xs="24" :sm="12">
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="宣传照片上传">
          <a-input
            placeholder="请输入企业联系人电话"
            v-decorator="['phone2', { rules: [{ required: true, message: '必填项' }] }]"
          />
        </a-form-item>
      </a-col>
    </a-row>
  </a-form> -->
</template>
<script>
//import md5 from "md5"
import api from '@/api'
import TwoStepCaptcha from '@/components/tools/TwoStepCaptcha'
import { mapActions } from 'vuex'
import { timeFix } from '@/utils/util'
import Vue from 'vue'
import { ACCESS_TOKEN, ENCRYPTED_STRING } from '@/store/mutation-types'
import { putAction, postAction, getAction } from '@/api/manage'
import { encryption, getEncryptedString } from '@/utils/encryption/aesEncrypt'
import store from '@/store/'
import { USER_INFO } from '@/store/mutation-types'
export default {
  data() {
    return {
      src:'',
      form: this.$form.createForm(this),
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
    }
  },
  methods: {
    getRegionCode() {
      const that = this
      let userinfo = Vue.ls.get(USER_INFO);
      let params = { 'enterpriseUscc': userinfo.enterpriseUscc }
      console.log("20211117==============="+userinfo.enterpriseUscc )
      getAction('/cxm/cxmEnterprise/queryEnterpriseInfo', params).then(res => {
        that.src = 'https://dzwq.chexinmeng.com/districtGovernmentManager/networkManager/initAdd.do?oneLevelRecordNo=' + res.result.parentId + '&twoLevelRecordNo=' + res.result.id
      })
    }
  },
  mounted() {
    this.getRegionCode()
  }
}
</script>

<style lang="less" scoped>
.user-layout-login {
  label {
    font-size: 14px;
  }

  .getCaptcha {
    display: block;
    width: 100%;
    height: 40px;
  }

  .forge-password {
    font-size: 14px;
  }

  button.login-button {
    padding: 0 15px;
    font-size: 16px;
    height: 40px;
    width: 100%;
  }

  .user-login-other {
    text-align: left;
    margin-top: 24px;
    line-height: 22px;

    .item-icon {
      font-size: 24px;
      color: rgba(0, 0, 0, 0.2);
      margin-left: 16px;
      vertical-align: middle;
      cursor: pointer;
      transition: color 0.3s;

      &:hover {
        color: #1890ff;
      }
    }

    .register {
      float: right;
    }
  }
}
#qrcode {
  width: 1.81rem;
  height: 1.81rem;
  padding: 0.15rem;
  background: #f1f1f1;
  /deep/img {
    width: 100%;
    height: 100%;
  }
}
</style>
<style>
.valid-error .ant-select-selection__placeholder {
  color: #f5222d;
}
</style>